﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EIIS.Infrastructure.Model.System.Authority;
using EIIS.FrameWork.Service;

namespace EIIS.Infrastructure.Service.System.Authority
{
    public interface IMenuManager : IGenericManager<MenuNode>
    {
        /// <summary>
        /// 菜单名称是否存在
        /// </summary>
        /// <param name="strName">菜单值</param>
        /// <param name="strId">Id的值，新增-1，修改实际值</param>
        /// <param name="strWhere">其他查询条件</param>
        /// <returns></returns>
        bool IsExistWithName(string strName, string strId, string strWhere);

        /// <summary>
        /// 菜单编码是否存在
        /// </summary>
        /// <param name="strTreeCode">菜单编码值</param>
        /// <param name="strId">Id的值，新增-1，修改实际值</param>
        /// <param name="strWhere">其他查询条件</param>
        /// <returns></returns>
        bool IsExistWithTreeCode(string strTreeCode, string strId, string strWhere);

        /// <summary>
        /// 是否有下级节点
        /// </summary>
        /// <param name="strId">Id的值</param>
        /// <returns></returns>
        bool HasChild(string strId);

        /// <summary>
        /// 创建根节点
        /// </summary>
        /// <returns></returns>
        MenuNode CreateRoot();
    }
}
